package cn.wolfcode.domain;

import com.alibaba.fastjson.JSON;
import lombok.*;

import java.util.HashMap;

/**
 * 字典目录
 */
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class SystemDictionary {
    private Long id;

    private String sn;//编码

    private String title;//标题

    private String intro;//简介

    //返回 json格式的字符串
    public String getJson(){
        HashMap<Object, Object> map = new HashMap<>();
        map.put("id",id);
        map.put("title",title);
        map.put("sn",sn);
        map.put("intro",intro);
        return JSON.toJSONString(map);
    }

}